package com.VitalFit.service;

import com.VitalFit.exception.AppointmentException;
import com.VitalFit.exception.FitnessPlanException;
import com.VitalFit.model.dto.AppointmentDTO;
import com.VitalFit.model.dto.FitnessPlanDTO;
import com.VitalFit.model.vo.AppointmentVO;
import com.VitalFit.model.vo.FitnessPlanVO;
import jakarta.validation.Valid;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.MethodArgumentNotValidException;

public interface CustomerService {

    @Transactional(rollbackFor = {MethodArgumentNotValidException.class, AppointmentException.class})
    AppointmentVO makeAppointment(Long userId, AppointmentDTO appointmentDTO);

    @Transactional(rollbackFor = {MethodArgumentNotValidException.class, FitnessPlanException.class})
    FitnessPlanVO purchaseFitnessPlan(Long userId, @Valid FitnessPlanDTO fitnessPlanDTO);
}
